Action hook 'delete_post_{$post->post_type}'

in WP Core File wp-includes/post.php at line 3603

Description

Fires immediately before a post is deleted from the database. The dynamic portion of the hook name, `$post->post_type`, refers to the post type slug.

Occurrences

Filename Line Number
wp-includes/post.php 3603

Parameters

Type Name Description
int $post_id Post ID.
WP_Post $post Post object.

PHP Doc

/**
	 * Fires immediately before a post is deleted from the database.
	 *
	 * The dynamic portion of the hook name, `$post->post_type`, refers to
	 * the post type slug.
	 *
	 * @since 6.6.0
	 *
	 * @param int     $post_id Post ID.
	 * @param WP_Post $post    Post object.
	 */